import requests
from lxml import etree

for page in range(0, 10):
    print(f'---------------{page+1}-------------------------')
    if page == 0:
        url = f'https://www.boc.cn/sourcedb/whpj/index.html'
    else:
        url = f'https://www.boc.cn/sourcedb/whpj/index_{page}.html'

    response = requests.get(url)
    text = response.content.decode('utf-8')
    tree = etree.HTML(text)
    line = tree.xpath('//table/tr[position()>1]')
    for tr in line:
        name = tr.xpath('./td[1]')
        print(name[0].text)

